Count of duplicate elements in the given array